import unittest
import requests
import json
import config as conf
import common
from importlib import import_module
from datetime import datetime

class BaseTestCase(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        app = import_module(cls.__module__.split('.')[0])
        cls.db = common.db.DB(**conf.DATABASES[app.database][1]).session

    @classmethod
    def tearDownClass(cls):
        cls.db.close()

    def setUp(self):
        pass

    def tearDown(self):
        pass
        # self.db.execute('''
        #         set foreign_key_checks = 0; 
        
        #         delete from video;

        #         set foreign_key_checks = 1;  
        # ''')
        # self.db.commit()